Particular embodiments generally relate to three-dimensional (3D) authoring tools.
Proprietary three-dimensional (3D) authoring tools allow a user to create and render 3D elements on a display. The proprietary authoring tools allow users to place elements into a single 3D environment. For example, when the user creates an element, the element can be placed into a 3D space with other 3D elements. No transform and/or projection operations are needed to place the 3D element into the 3D environment. This is because the proprietary 3D authoring tool works in a single 3D space. The proprietary 3D authoring tools allow a user to create elements in the 3D space without any transformation and projection; however, the tool is proprietary and thus the design is not portable to other platforms. For example, if the user wants to display a created page in a different environment, the code for the page is not portable to the other environment.
When creating 3D elements in a 3D environment, it is helpful to include a line grid to enhance the visualization of the 3D elements. In one example, lines of a line grid are hidden when the lines would appear to be behind the 3D element and displayed when the lines appear to be in front of the 3D element. Including the line grid and calculating where to hide the lines in a proprietary authoring tool may be provided without transforming and projecting the placed 3D elements because the 3D elements are automatically placed in the same 3D space as the line grid. However, even though the user can use the line grid, the user is still restricted in using the proprietary authoring tool.
A web browser is a platform independent application that can be used to display 3D elements. However, the web browser treats individual 3D elements as being in independent 3D spaces. Each 3D element is independently transformed and projected in each element's own 3D space. Thus, traditional techniques for computing hidden lines cannot be performed because of multiple independent perspective projections.